﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.Regions;
using System.Windows.Browser;

namespace VS.MainModule.Views
{
    public partial class ArticleView : UserControl
    {
        public ArticleView(ArticleViewModel viewModel)
        {
            InitializeComponent();
            DataContext = viewModel;
            //Loaded += (x, y) => { if (viewModel.Articles.Count > 0) lb.SelectedIndex = 0; };
        }

        private void Right_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            isv.ScrollRight(1);           
        }

        private void Left_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            isv.ScrollLeft(1);
        }

        private void XamlControl_XamlLoaded(object sender, Infrastructure.Controls.XamlLoadedEventArgs e)
        {
            e.Element.DataContext = DataContext;
        }

    }
}
